Imports Pacientes
Imports System.Data.SqlClient

Public Class frmSolicitudPedidoPresupuesto
    Private datos As DataSet = New DataSet()
    Private Insumo As Insumo = Nothing
    Private CodIns As String = ""
    Private prov As Proveedor = Nothing

    'Sub CrearDestino()
    '    datos = New DataTable("PROV_DESTINO")
    '    datos.Columns.Add(New DataColumn("codigo"))
    '    datos.Columns.Add(New DataColumn("descripcion"))
    '    datos.Columns.Add(New DataColumn("DescripTipo"))
    '    datos.Columns.Add(New DataColumn("precio"))

    '    destino.Tables.Add(datos)
    '    grAnalisisAsignados.DataSource = destino
    '    grAnalisisAsignados.DataMember = "prov_destino"
    'End Sub

    Private Sub grdInsumosF_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles grdInsumosF.CellContentClick
        grdInsumosF.AutoGenerateColumns = False
        grdInsumosF.AutoGenerateColumns = False

        Me.MaximizeBox = False
        Me.MinimizeBox = False

        'CrearDestino()
        Insumo = New Insumo()
        datos = Insumo.BuscarIns(CodIns, conexion)
        grdInsumosF.DataSource = datos
        grdInsumosF.DataMember = "insumos"

    End Sub


    Private Sub cboProveedor_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboProveedor.SelectedIndexChanged
        Dim datos As DataSet = Nothing
        prov = New Proveedor()
        datos = prov.BuscarDatos(conexion)
        Me.cboProveedor.DataSource = datos.Tables(0)
        Me.cboProveedor.DisplayMember = "Apellido"
        Me.cboProveedor.ValueMember = "Nombre"

        Dim index As Integer = 0
        index = Me.cboProveedor.FindString(Me.cboProveedor.Text)
        Me.cboProveedor.SelectedIndex = index

        Me.cboProveedor.Text = ""
    End Sub

End Class
